﻿using System;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;

namespace Conexion
{
    public class ConexionSQLServer
    {
        private string strCadena;
        private SqlConnection con;

        //*Conexion
        public ConexionSQLServer()
        {
            System.Configuration.AppSettingsReader config = new System.Configuration.AppSettingsReader();

            con = new SqlConnection();

            //this.con.ConnectionString = ((string)(config.GetValue("ConexionBDDISENO", typeof(string))));
            this.con.ConnectionString = ("DATA SOURCE=.\\SQLEXPRESS;Initial Catalog = BDSGCP;Integrated Security=Yes");

            strCadena = this.con.ConnectionString;
        }

       
        public SqlConnection conexion
        {
            get
            {
                return con;
            }
        }


        public string CadenaConexion
        {
            get
            {
                return strCadena;
            }
        }
    }
}
